package com.webbei.HAO.service.impl;

import java.util.List;
import java.util.Map;

import com.webbei.HAO.dao.ChDao;
import com.webbei.HAO.service.ChSer;
import com.webbei.pojo.Brands;
import com.webbei.pojo.Carseries;
import com.webbei.pojo.Cartypes;
import com.webbei.pojo.Customer;
import com.webbei.pojo.ThirdPartyInfo;

public class Chserimpl implements ChSer {
        private ChDao dao;

		public void setDao(ChDao dao) {
			this.dao = dao;
		}


		public List<Brands> list() {
		     return dao.list();
		}

	    public List<Carseries> carlist(int id) {
		return dao.carlist(id);
		}



		public List<Customer> cuslist() {
			 return dao.cuslist();
		}

      public void createfile(String userpath) {
			dao.createfile(userpath);

		}



		public int getUidbyEmail(String mail) {
		return dao.getUidbyEmail(mail);
		}


	/*	@Override
		public boolean insertUname(String uname, int id,String  userface) {
			return dao.insertUname(uname, id, userface);
		}
*/

		@Override
		public String getMailbyUid(int id) {
			return dao.getMailbyUid(id);
		}


		@Override
		public Customer cus(int id) {

			return dao.cus(id);
		}


		@Override
		public boolean updatePwdbyEmail(String mail, String pwd) {
		    return dao.updatePwdbyEmail(mail, pwd);
		}


		@Override
		public String getPwdbyUid(int id) {
			return dao.getPwdbyUid(id);
		}


		@Override
		public boolean updatePwdbyId(int id, String pwd) {
			return dao.updatePwdbyId(id, pwd);
		}


		@Override
		public boolean update(int userid,String username, String realname, String file,
				String sex,String provaice, String city,
				String address, String area,String telphone, String phone) {
			return dao.update(userid,username, realname, file, sex,provaice, city, address,area, telphone, phone);
		}


		@Override
		public int register(String mail,String password,String uname,String userface,String nickname){
			System.out.println(nickname+"----nickname");
		return dao.register(mail, password, uname, userface,nickname);
		}


		@Override
		public int customercheck(String email) {
			// TODO Auto-generated method stub
			return dao.customercheck(email);
		}


		@Override
		public int customercheck2(String name) {
			// TODO Auto-generated method stub
			return dao.customercheck2(name);
		}

		public String getPwdByMail(String mail){
			return dao.getPwdByMail(mail);
		}


		@Override
		public List<Cartypes> cartypeNamelist(String seriesName) {
			return dao.cartypeNamelist(seriesName);
		}


		@Override
		public int insertcuslimit(String uname) {
			return dao.insertcuslimit(uname);
		}


		@Override
		public String LoginTheWebBei(Map<String, String> m) {
			// TODO Auto-generated method stub
			return dao.LoginTheWebBei(m);
		}


		@Override
		public int insertThirdParty(Map map) {
			// TODO Auto-generated method stub
			return dao.insertThirdParty(map);
		}


		@Override
		public String customercheck3(String openid) {
			String name = dao.getNameByOpenId(openid);
			System.out.println(name+"----------------");
			return name;
		}


		@Override
		public int checkEmail(String email) {
			// TODO Auto-generated method stub
			return dao.checkEmail(email);
		}


		@Override
		public void insertUserhot(String username,String face) {
			dao.insertUserhot(username,face);

		}


		@Override
		public void insertLovecar(int userid) {
			dao.insertLovecar(userid);

		}


		@Override
		public void updatePersonalSign(String username, String personalSign) {
			// TODO Auto-generated method stub
			dao.updatePersonalSign(username,personalSign);
		}


		@Override
		public int getProductIdByUrl(String bgPic) {
			return dao.getProductIdByUrl(bgPic);
		}


		@Override
		public List getBgPicByUrl(String bgPic) {
			// TODO Auto-generated method stub
			return dao.getBgPicByUrl(bgPic);
		}


		@Override
		public List<ThirdPartyInfo> getThirdPartyByUsername(String username) {

		   return dao.getThirdPartyByUsername(username);
		}


		@Override
		public ThirdPartyInfo getThirdPartyById(Object thirdTypeId) {
			// TODO Auto-generated method stub
			return dao.getThirdPartyById(thirdTypeId);
		}


		@Override
		public int deleteThirPartyById(int id) {
			// TODO Auto-generated method stub
			return dao.deleteThirPartyById(id);
		}


		public void update(Customer cus) {
			// TODO Auto-generated method stub
			dao.update(cus);
		}


		@Override
		public void updateClickCountByProductId(int productId) {
			dao.updateClickCountByProductId(productId);

		}

}
